\hypertarget{classUDPSender}{
\section{UDPSender Class Reference}
\label{classUDPSender}\index{UDPSender@{UDPSender}}
}
Inheritance diagram for UDPSender::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classUDPSender}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual size\_\-t \hyperlink{classUDPSender_ae0bfafaadbbccb6a12b2860b0bfa95a}{send} (char $\ast$, size\_\-t)=0
\begin{CompactList}\small\item\em Sends data over UDP. \item\end{CompactList}\item 
virtual size\_\-t \hyperlink{classUDPSender_176cd823dc08f7582dfd9fb97733c64a}{send} (const size\_\-t \&)=0
\begin{CompactList}\small\item\em Sends a size\_\-t variable over UDP. \item\end{CompactList}\item 
\hypertarget{classUDPSender_e75143afca03f0537c8f312a46f9aeee}{
virtual size\_\-t \hyperlink{classUDPSender_e75143afca03f0537c8f312a46f9aeee}{send} (const std::string \&)=0}
\label{classUDPSender_e75143afca03f0537c8f312a46f9aeee}

\begin{CompactList}\small\item\em Sends a string over UDP. \item\end{CompactList}\item 
\hyperlink{classUDPSender}{UDPSender} \& \hyperlink{classUDPSender_0ce505cbfc48cd9c00efca2dbddb5852}{operator$<$$<$} (const \hyperlink{classWorkflow}{Workflow} \&w\_\-)
\begin{CompactList}\small\item\em Send a \hyperlink{classWorkflow}{Workflow} over UDP using boost serialization. \item\end{CompactList}\item 
\hyperlink{classUDPSender}{UDPSender} \& \hyperlink{classUDPSender_7a4920890a6faeb11b7009aba1dc55d4}{operator$<$$<$} (const \hyperlink{classTaskDescriptor}{TaskDescriptor} \&td\_\-)
\begin{CompactList}\small\item\em Send a \hyperlink{classTaskDescriptor}{TaskDescriptor} over UDP using boost serialization. \item\end{CompactList}\item 
\hyperlink{classUDPSender}{UDPSender} \& \hyperlink{classUDPSender_0575ad8bfef9fbbd7e28a3ca4a7d0b74}{operator$<$$<$} (const \hyperlink{classAddress}{Address} \&a\_\-)
\begin{CompactList}\small\item\em Send an \hyperlink{classAddress}{Address} over UDP using boost serialization. \item\end{CompactList}\item 
{\footnotesize template$<$typename Serializable$>$ }\\\hyperlink{classUDPSender}{UDPSender} \& \hyperlink{classUDPSender_56a82a9d37f89a9bed72452c0be2935e}{operator$<$$<$} (const Serializable \&obj)
\begin{CompactList}\small\item\em Send a Serializable object over UDP using boost serialization. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\hyperlink{classUDPSender}{UDPSender}

Abstract class that defines common methods and attributes for sending data over UDP. Inheriting classes must implement \hyperlink{classUDPSender_ae0bfafaadbbccb6a12b2860b0bfa95a}{send()} methods.

TODO: Error/exception handling on operator $<$$<$ call on non-serializable objects. 

\subsection{Member Function Documentation}
\hypertarget{classUDPSender_ae0bfafaadbbccb6a12b2860b0bfa95a}{
\index{UDPSender@{UDPSender}!send@{send}}
\index{send@{send}!UDPSender@{UDPSender}}
\subsubsection[send]{\setlength{\rightskip}{0pt plus 5cm}virtual size\_\-t UDPSender::send (char $\ast$, \/  size\_\-t)\hspace{0.3cm}{\tt  \mbox{[}pure virtual\mbox{]}}}}
\label{classUDPSender_ae0bfafaadbbccb6a12b2860b0bfa95a}


Sends data over UDP. 

This class method uses provided buffer to acquire data, and should return the number of bytes written. 

Implemented in \hyperlink{classUDPClient_b0bb386fbae0a70b13f0f06fa1ada3b4}{UDPClient}, \hyperlink{classUDPSenderReceiver_0bdb1089fff9950011278edd2e90f803}{UDPSenderReceiver}, \hyperlink{classUDPServer_1_1Responder_b30e256fa0f086f4402f2ed1d87e08f4}{UDPServer::Responder}, and \hyperlink{classUDPServer_441a88c1187c9945bc281af76dd726ac}{UDPServer}.\hypertarget{classUDPSender_176cd823dc08f7582dfd9fb97733c64a}{
\index{UDPSender@{UDPSender}!send@{send}}
\index{send@{send}!UDPSender@{UDPSender}}
\subsubsection[send]{\setlength{\rightskip}{0pt plus 5cm}virtual size\_\-t UDPSender::send (const size\_\-t \&)\hspace{0.3cm}{\tt  \mbox{[}pure virtual\mbox{]}}}}
\label{classUDPSender_176cd823dc08f7582dfd9fb97733c64a}


Sends a size\_\-t variable over UDP. 

Useful if you have an item larger than 1024 bytes, so you can warn the receiver that item size requires more than one packet. 

Implemented in \hyperlink{classUDPClient_9815d3657997a5799d5caf835a151ecb}{UDPClient}, \hyperlink{classUDPSenderReceiver_2f8559cc694cce83608f8af6b3269d95}{UDPSenderReceiver}, \hyperlink{classUDPServer_1_1Responder_1f514bba6c1cfd9915d6d8f3dc819e4d}{UDPServer::Responder}, and \hyperlink{classUDPServer_501561f4120c5f50376c58558e4adeb4}{UDPServer}.\hypertarget{classUDPSender_0ce505cbfc48cd9c00efca2dbddb5852}{
\index{UDPSender@{UDPSender}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!UDPSender@{UDPSender}}
\subsubsection[operator$<$$<$]{\setlength{\rightskip}{0pt plus 5cm}{\bf UDPSender}\& UDPSender::operator$<$$<$ (const {\bf Workflow} \& {\em w\_\-})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPSender_0ce505cbfc48cd9c00efca2dbddb5852}


Send a \hyperlink{classWorkflow}{Workflow} over UDP using boost serialization. 

\begin{Desc}
\item[Author:]Davide Giuseppe Monaco Mind that it is necessary to call resolve() on Server/Client before using operator $<$$<$ .\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w\_\-}]the \hyperlink{classWorkflow}{Workflow} to serialize and send via UDP.\end{description}
\end{Desc}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000001}{Deprecated}]Use templated method instead. \end{Desc}
\hypertarget{classUDPSender_7a4920890a6faeb11b7009aba1dc55d4}{
\index{UDPSender@{UDPSender}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!UDPSender@{UDPSender}}
\subsubsection[operator$<$$<$]{\setlength{\rightskip}{0pt plus 5cm}{\bf UDPSender}\& UDPSender::operator$<$$<$ (const {\bf TaskDescriptor} \& {\em td\_\-})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPSender_7a4920890a6faeb11b7009aba1dc55d4}


Send a \hyperlink{classTaskDescriptor}{TaskDescriptor} over UDP using boost serialization. 

\begin{Desc}
\item[Author:]Davide Giuseppe Monaco Mind that it is necessary to call resolve() on Server/Client before using operator $<$$<$ .\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em td\_\-}]the \hyperlink{classTaskDescriptor}{TaskDescriptor} to serialize and send via UDP.\end{description}
\end{Desc}
\begin{Desc}
\item[\hyperlink{deprecated__deprecated000002}{Deprecated}]Use templated method instead. \end{Desc}
\hypertarget{classUDPSender_0575ad8bfef9fbbd7e28a3ca4a7d0b74}{
\index{UDPSender@{UDPSender}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!UDPSender@{UDPSender}}
\subsubsection[operator$<$$<$]{\setlength{\rightskip}{0pt plus 5cm}{\bf UDPSender}\& UDPSender::operator$<$$<$ (const {\bf Address} \& {\em a\_\-})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPSender_0575ad8bfef9fbbd7e28a3ca4a7d0b74}


Send an \hyperlink{classAddress}{Address} over UDP using boost serialization. 

Mind that it is necessary to call resolve() on Server/Client before using operator $<$$<$ .

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em a\_\-}]the \hyperlink{classAddress}{Address} to serialize and send via UDP. \end{description}
\end{Desc}
\hypertarget{classUDPSender_56a82a9d37f89a9bed72452c0be2935e}{
\index{UDPSender@{UDPSender}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!UDPSender@{UDPSender}}
\subsubsection[operator$<$$<$]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Serializable$>$ {\bf UDPSender}\& UDPSender::operator$<$$<$ (const Serializable \& {\em obj})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPSender_56a82a9d37f89a9bed72452c0be2935e}


Send a Serializable object over UDP using boost serialization. 

Mind that it is necessary to call resolve() on Client (or bind() on Server) before using operator $>$$>$.

\begin{Desc}
\item[Note:]An object is serializable if it has a serialize() private method. See boost::serialize documentation.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em obj}]the object to serialize and send via UDP. \end{description}
\end{Desc}


Reimplemented in \hyperlink{classUDPSenderReceiver_f3dc7d2d99ebc6c6300dee018c2b4cb6}{UDPSenderReceiver}.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{udpinterface_8cpp}{udpinterface.cpp}\end{CompactItemize}
